public class HomeWork13_10{
    public static void main(String[] args){
        String[] stuArr = new String[]{
            "古美门", "卷福", "张三", 
            "花生", "小李子"
        };
        Students stu = new Students(stuArr);    
        
        stu.deleteStu("张三");
        stu.showStuName();
    }
}

class Students{
    private String[] stu;
    
    public Students(String[] stu){
        this.stu = stu;
    }
    //delete student
    public void deleteStu(String name){
        String[] newStu = new String[stu.length - 1];
        
        for(int i = 0, k = 0; i < newStu.length; k++){
            if(!stu[k].equals(name)){
                newStu[i] = stu[k];
                ++i;
            }
        }
        stu = newStu;
    }
    //show all students' name
    public void showStuName(){
        for(String item : stu){
            System.out.println(item);
        }
    }
}